﻿/*
 * Converts the string representation of a number to its integer equivalent. A return value indicates whether the 
 * conversion succeeded.
 */
create function [Int].[TryParse] ( @p_Value nvarchar(max) )
returns int as
begin
  
  if @p_Value not like '%[^0-9]%'
  begin
    return Convert( int, @p_Value );
  end
  
  return null;

end